package com.huamao.zh;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.huamao.zh.service.ISktSysConfigsService;
import com.huamao.zh.service.SysConfigsService;

@Controller
public class test {

	Logger log = LogManager.getLogger(getClass());

	@Autowired
	ISktSysConfigsService sktSysConfigsService;
	@Autowired
	SysConfigsService sysConfigsService;

	@RequestMapping(value = "/")
	@ResponseBody
	public Object show() {
		try {
			Object o = sktSysConfigsService.test();
			return o;
		} catch (Exception ex) {
			log.error(ex);
		}
		return "abc";
	}

	@RequestMapping(value = "/selectAll")
	@ResponseBody
	public Object select() {
		return sysConfigsService.selectAll();
	}

	@RequestMapping(value = "/getByFieldCode")
	@ResponseBody
	public Object getByFieldCode() {
		return sysConfigsService.getByFieldCode("rechargeReceiver");
	}
}
